package com.bankcomm.ui.adapter;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.bankcomm.R;

public class DistenceAdaper extends BaseAdapter {
	private Context context;
	private String[] Texts;

	public DistenceAdaper(Context context, String[] Texts) {
		this.context = context;
		this.Texts = Texts;
	}

	@Override
	public int getCount() {
		return this.Texts.length;
	}

	@Override
	public Object getItem(int position) {
		return this.Texts[position];
	}

	@Override
	public long getItemId(int position) {
		return position;
	}

	@Override
	public View getView(int position, View convertView, ViewGroup arg2) {

		convertView = LayoutInflater.from(this.context).inflate(
				R.layout.layout_city_item, null);
		TextView textv = (TextView) convertView.findViewById(R.id.cityName);
		textv.setText(Texts[position]);
		textv.setTextSize(15);
		textv.setTextColor(Color.rgb(127, 157, 227));
		return convertView;

	}

}
